package com.hohai.mall.product.controller;

import com.hohai.mall.product.bo.ProductSpuBO;
import com.hohai.mall.product.service.ProductSpuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author prik
 * @date 2019/7/22
 */
@RestController
@RequestMapping("/product/spu")
public class ProductSpuController {

    @Autowired
    ProductSpuService productSpuService;

    @GetMapping("/info/{id}")
    public ProductSpuBO info(@PathVariable int id) {
        ProductSpuBO productSpu = productSpuService.getProductSpu(id);
        return productSpu;
    }

}
